<template>
	<div class="all">

		<div class="jli" v-for="(item,index) in list" :key="index">
			<div class="flexb">
				<div class="hei cu da">
					<span v-if="item.iccid != null">{{item.iccid.substring(item.iccid.length-9)}}</span>
					<span v-if="item.iccid == '0000000000'">
						人工更改余额
					</span>
					<span v-if="item.type == 1">
						{{item.payMonth}}
					</span>
					<span v-if="item.iccid != '0000000000'">
						{{item.title}}
					</span>
					
				</div>
				<div class="hei cu da" style="color: #FF0000;" v-if="(item.type == 1 || item.type == 2 || item.iccid == '0000000000') && item.price != 0">
					-{{item.price | qu0}}
				</div>
				<div class="hei cu da" v-if="(item.type == 3 && item.iccid != '0000000000' && item.price != 0 ) || (item.type == 4 && item.iccid != '0000000000')">
					+{{item.price | qu0}}
				</div>
				<div class="hei cu da" style="color: #FF0000;" v-if="item.type == 3 && item.price == 0 ">
					-0
				</div>
			</div>
			<div class="flexb">
				<div class="hui">{{item.createTime}}</div>
			</div>
		</div>


	</div>
</template>

<script>
	import axios from 'axios'
	import bus from '@/assets/bus.js'
	export default {
		name: 'genghuan',
		data() {
			return {
				list: ""
			}
		},
		watch: {
			// num:function(newValue, oldValue) {
			//   console.log(newValue, oldValue)
			// }
		},
		computed: {
			// zongjia:function(){
			//   return this.num * 100
			// }
		},
		created() {
			this.getlist()

		},
		methods: {
			getlist: function() {
				this.axios.get(this.url + `/mobile/api/getPayList?pageSize=100`)
					.then(response => {
						if (response.data.success == true) {
							this.list = response.data.result.records
						} else {
							this.$toast(response.data.message);
						}
					})
			}

		},

	}
</script>

<style scoped lang="less">
	.all {
		background: #FFFFFF;
		font-size: 0.28rem;
		min-height: 100vh;
		padding: 0.3rem;

		.jli {
			border-bottom: 1px #F1F3F5 solid;
			line-height: 0.5rem;
			padding-bottom: 0.1rem;
			margin-bottom: 0.2rem;
		}
	}
</style>
